function nullProto() {
    // 创建原型链为null的对象
    var obj = Object.create({});
    var obj1 = Object.create(null);
    var obj2 = {};
    obj2.__proto__ = null;

    Object.defineProperty(obj, 'name', {
        writable: false,
        value: "tugenhua"
    });
    console.log("obj.name", obj.name);
    obj.name = 'name'; // no effect
    console.log("obj.name", obj.name);
}

nullProto();
